Hook for opening the payment selection modal
UseSelectPaymentModalReturnType
(settings: SelectPaymentSettings) => void
Function to open the Payment Selection modal with the specified settings.
Parameters:
The settings
object can include the following properties:
Parameter | Type | Description |
---|---|---|
collectibles | Array<{tokenId: string, quantity: string}> | Array of collectibles to purchase |
chain | number | Blockchain network ID |
price | string | Price in smallest unit of the currency |
targetContractAddress | string | Address of the contract to interact with |
recipientAddress | string | Address to receive the purchased items |
currencyAddress | string | Address of the currency token contract |
collectionAddress | string | Address of the NFT collection contract |
creditCardProviders | string[] | List of supported credit card providers (e.g., ‘sardine’, ‘transak’) |
transakConfig | object | Configuration for Transak integration |
copyrightText | string | Copyright text to display in the modal |
onSuccess | (txnHash: string) => void | Callback when transaction succeeds |
onError | (error: Error) => void | Callback when an error occurs |
onClose | () => void | Callback when the modal is closed |
txData | string | Encoded transaction data for the purchase |
() => void
Function to close the Payment Selection modal.
SelectPaymentSettings | undefined
The current settings configuration for the Payment Selection modal.